package com.example.demo;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.SessionAttribute;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

@RestController
@RequestMapping("/get")
public class GetSession {
    @RequestMapping("/getsess2")
    public String getSession2(@SessionAttribute(value = "ylc", required = false) String userinfo) {
        return userinfo;
    }
}
